<template>
  <div>
    <h1>music</h1>
    <p>{{ msg | handleStr }}</p>
    
  </div>
</template>

<script>
export default {
  data() {
    return {
      msg: "水水水水水水水水",
    };
  },
  filters: {
    handleStr(val) {
      if (val.length > 3) {
        val = val.slice(0, 3) + "...";
      }
      return val;
    },
  },
};
</script>

<style>
</style>